﻿#include "game.h"

void Caidan()
{
	printf("***********************\n");
	printf("*******ɨϷ********\n");
	printf("*******菜单********\n");
	printf("*******1开始游戏Ϸ******\n");
	printf("*******0结束游戏Ϸ******\n");

}
void game()
{
	char mine[ROWS][COLS] = { '0' };
	char show[ROWS][COLS] = { '*' };
	//ʼ
	CSH_qipan(mine, ROWS, COLS, '0');
	CSH_qipan(show, ROWS, COLS, '*');
	//
	SetMine(mine, ROW, COL);
	//ӡ
	/*DaYin_qipan(mine,ROW,COL);*/
	DaYin_qipan(show, ROWS, COLS);
	SearchMine(mine, show, ROW, COL);
}
int main()
{
	int q = 0;
	srand((unsigned int)time(NULL));
	do
	{
		Caidan();
		scanf_s("%d", &q);

		switch (q)
		{
		case 1:
			game();
			break;
		case 0:
			printf("Ϸ");
			break;
		}


	} while (q);
	return 0;
}